package com.sirun.cn.fca.module.main.home.temp.repo;

import com.sirun.cn.fca.module.main.home.temp.VehicleRespons;
import com.tencent.cloud.iov.kernel.constant.HttpHeaderConst;
import com.tencent.cloud.iov.kernel.model.BaseResponse;

import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Path;

public interface ControlService {

    @Headers({HttpHeaderConst.ADD_COOKIE, HttpHeaderConst.CONTENT_TYPE_JSON})
    @POST("/v1/tsp/ro/doors")
    Observable<BaseResponse<ControlResponse>> controlDoor(@Header("din") String din,
                                                          @Body ControlRequest request);

    @Headers({HttpHeaderConst.ADD_COOKIE, HttpHeaderConst.CONTENT_TYPE_JSON})
    @POST("/v1/tsp/ro/engine")
    Observable<BaseResponse<ControlResponse>> controlEngine(@Header("din") String din,
                                                            @Body ControlRequest request);

    @Headers({HttpHeaderConst.ADD_COOKIE, HttpHeaderConst.CONTENT_TYPE_JSON})
    @POST("/v1/tsp/ro/alarm")
    Observable<BaseResponse<ControlResponse>> controlBeer(@Header("din") String din,
                                                          @Body ControlRequest request);

    @Headers({HttpHeaderConst.ADD_COOKIE, HttpHeaderConst.CONTENT_TYPE_JSON})
    @POST("/v1/tsp/ro/{type}")
    Observable<BaseResponse<ControlResponse>> controlCar(@Path("type") String type, @Header("din") String din,
                                                         @Body ControlRequest request);

    @Headers({HttpHeaderConst.ADD_COOKIE, HttpHeaderConst.CONTENT_TYPE_JSON})
    @GET("/v1/tsp/ro/status")
    Observable<BaseResponse<ControlPollingResponse>> controlPolling(@Header("din") String din,
                                                                    @Header("platformResponseId") String platformResponseId);

    @Headers({HttpHeaderConst.ADD_COOKIE, HttpHeaderConst.CONTENT_TYPE_JSON})
    @POST("/v2/iam_gateway/car_management/get_all_car_status ")
    Observable<BaseResponse<VehicleRespons>> getVehicle();
}
